﻿using HoverTree.BLL;
using HoverTree.Model;
using System;
using System.Web;

namespace HoverTreeMobile.HvtAdmin
{
    public partial class PanelUserAdd : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (HttpContext.Current.User.Identity.Name != "hovertree")//超级管理员
            {
                Response.Redirect("index.aspx");
            }
        }

        protected void buttonOK_Click(object sender, EventArgs e)
        {
            PanelUserInfo m_model = new PanelUserInfo();

            m_model.Hvtusername = textBoxUserName.Text.Trim();
            m_model.Hvtpassword =textBoxPassword.Text;
            m_model.HvtWelcome = textBoxWelcome.Text;

            HvtPanelUser m_panelUser = new HvtPanelUser();
            literalTips.Text = m_panelUser.Add(m_model);

            if (literalTips.Text == string.Empty)
                literalTips.Text = "添加成功";

        }
    }
}